package com.jake.hunter.pattern.observer.impl;

import com.jake.hunter.pattern.observer.BaseNumericObserver;
import com.jake.hunter.pattern.observer.NumericSubject;

public class BinaryObserver extends BaseNumericObserver {

    public BinaryObserver(NumericSubject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Binary String: " + Integer.toBinaryString(subject.getState()));
    }

}
